package com.ruyuan.eshop.data.migrate.tool.canal.binlog;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.otter.canal.protocol.CanalEntry;

/**
 * binlog消费组件接口
 * @author zhonghuashishan
 * @version 1.0
 */
public interface BinlogConsumer {

    /**
     * 消费binlog数据
     * @param tableName
     * @param eventType
     * @param beforeData
     * @param afterData
     */
    void consumer(String tableName, CanalEntry.EventType eventType, JSONObject beforeData, JSONObject afterData);

}